﻿using System;
using System.Collections.Generic;
using System.Text;
using Eleanor.DAL;
using System.Data;

namespace Eleanor.BLL
{
    public class SubscriberBLL
    {
        protected SubscriberDAL subscriberDAL = new SubscriberDAL();
        public int Add(dynamic subscriber)
        {
            return subscriberDAL.Insert(subscriber);
        }

        public int Update(dynamic subscriber)
        {
            return subscriberDAL.Update(subscriber);
        }

        public DataTable GetDataTable()
        {
            return subscriberDAL.SelectTable();
        }

        public List<dynamic> GetAll()
        {
            return subscriberDAL.SelectAll();
        }

        public dynamic Get(string email)
        {
            return subscriberDAL.Select(email);
        }

        public int Delete(int subscriberId)
        {
            return subscriberDAL.Delete(subscriberId);
        }
    }
}